// File:    TnMemory.cs
// Author:  HT
// Created: Tuesday, October 18, 2011 9:40:48 AM
// Purpose: Definition of Class TnMemory

using System;
using System.Collections.Generic;
using ESRI.ArcGIS.Geodatabase;
using ESRI.ArcGIS.Carto;
using ESRI.ArcGIS.Geometry;

namespace Tayninh2011
{
    public class TnMemory : ITnMemDuong, ITnMemThua,ITnMemExTools,ITnMemCalculator,ITnMemHem
    {
        #region Cho ITnMemThua
        
        
        private double _giadatTong=0;
        private double _giadat1=0;
        private double _giadat2=0;
        private string _ghichuThua="";
        private int _somattien=0;
        private int _somathem = 0;
        private int _socachtinh=0;
        private string _cachtinh="";
        private int _numSelectedFeature = 0;
        private string _newWhereClause = "";
        private string _curWhereClause = "";
        private double _dientich1 = 0;
        private double _dientich2 = 0;
        private double _dientichTong = 0;
        private double _dongia = 0;
        #endregion 

        #region cho ITnMemDuong
        private string _maduong = "";
        private string _tenduong = "";
        private double _giadatDuong = 0;
        private double _dorong = 0;
        #endregion

        #region Cho ITnMemHem
        private int _soDuongChinh = 0;
        private int _soHemChinh = 0;
        private string _tenDuongChinh = "";
        private string _ghichuHem = "";
        private string _tenHemChinh = "";
        #endregion

        
        protected IFeatureClass _featureClass;
        protected IFeatureLayer _featureLayer;
        protected IFeatureSelection _featureSelection;
        protected IQueryFilter _queryFilter;
        protected IFeature _feature;
        protected IFeatureCursor _featureCursor;
        protected ICursor _cursor;
        protected IRow _row;
        protected IWorkspaceEdit _workspaceEdit;
        protected IWorkspace _workspace;
        protected IArea _area;
        protected string _name="";
        protected string _environment="";
        private string _pathLayer="";

        

        private Dictionary<EnumTask, object[]> _inputValues = null;
        private TnThua _inputThua = null;
        private TnDuong _inputDuong = null;
        private TnHem _inputHem = null;
        

        //constructor
        public TnMemory()
        {
            _inputValues = new Dictionary<EnumTask, object[]>();
            this._queryFilter = new QueryFilterClass();
            
        }
        

        #region ITnMemDuong Members

        string ITnMemDuong.maduong
        {
            get
            {
                return this._maduong;
            }
            set
            {
                this._maduong = value;
            }
        }

        string ITnMemDuong.tenduong
        {
            get
            {
                return this._tenduong;
            }
            set
            {
                this._tenduong = value;
            }
        }

        double ITnMemDuong.giadat
        {
            get
            {
                return this._giadatDuong;
            }
            set
            {
                this._giadatDuong = value;
            }
        }

        double ITnMemDuong.dorong
        {
            get
            {
                return this._dorong;
            }
            set
            {
                this._dorong = value;
            }
        }

        #endregion

        #region ITnMemThua Members

        double ITnMemThua.Dongia
        {
            get
            {
                return this._dongia;
            }
            set
            {
                this._dongia = value;
            }
        }

        double ITnMemThua.GiadatTong
        {
            get
            {
                return this._giadatTong;
            }
            set
            {
                this._giadatTong = value;
            }
        }

        double ITnMemThua.Giadat1
        {
            get
            {
                return this._giadat1;
            }
            set
            {
                this._giadat1 = value;
            }
        }

        double ITnMemThua.Giadat2
        {
            get
            {
                return this._giadat2;
            }
            set
            {
                this._giadat2 = value;
            }
        }

        double ITnMemThua.Dientich1
        {
            get
            {
                return this._dientich1;
            }
            set
            {
                this._dientich1 = value;
            }
        }

        double ITnMemThua.Dientich2
        {
            get
            {
                return this._dientich2;
            }
            set
            {
                this._dientich2 = value;
            }
        }

        double ITnMemThua.DientichTong
        {
            get
            {
                return this._dientichTong;
            }
            set
            {
                this._dientichTong = value;
            }
        }

        string ITnMemThua.Ghichu
        {
            get
            {
                return this._ghichuThua;
            }
            set
            {
                this._ghichuThua = value;
            }
        }

        int ITnMemThua.Somattien
        {
            get
            {
                return this._somattien;
            }
            set
            {
                this._somattien = value;
            }
        }

        int ITnMemThua.Somathem
        {
            get
            {
                return this._somathem;
            }
            set
            {
                this._somathem = value;
            }
        }

        int ITnMemThua.Socachtinh
        {
            get
            {
                return this._socachtinh;
            }
            set
            {
                this._socachtinh = value;
            }
        }

        string ITnMemThua.Cachtinh
        {
            get
            {
                return this._cachtinh;
            }
            set
            {
                this._cachtinh = value;
            }
        }


        #endregion

        #region ITnMemExTools Members

        int ITnMemExTools.NumSelectedFeature
        {
            get { return _numSelectedFeature; }
            set { _numSelectedFeature = value; }
        }

        string ITnMemExTools.PathLayer
        {
            get { return _pathLayer; }
            set { _pathLayer = value; }
        }


        #endregion

        #region ITnMemCalculator Members

        string ITnMemCalculator.newWhereClause
        {
            get
            {
                return this._newWhereClause;
            }
            set
            {
                this._newWhereClause = value;
            }
        }

        string ITnMemCalculator.curWhereClause
        {
            get
            {
                return this._curWhereClause;
            }
            set
            {
                this._curWhereClause = value;
            }
        }

        Dictionary<EnumTask, object[]> ITnMemCalculator.InputValues
        {
            get { return _inputValues; }
            set { _inputValues = value; }
        }

        TnThua ITnMemCalculator.inputThua
        {
            get { return _inputThua; }
            set { _inputThua = value; }
        }


        TnDuong ITnMemCalculator.inputDuong
        {
            get { return _inputDuong; }
            set { _inputDuong = value; }
        }

        TnHem ITnMemCalculator.inputHem
        {
            get { return _inputHem; }
            set { _inputHem = value; }
        }

        IFeatureClass ITnGeoObject.FeatureClass
        {
            get { return _featureClass; }
            set { _featureClass = value; }
        }


        IFeatureLayer ITnGeoObject.FeatureLayer
        {
            get { return _featureLayer; }
            set { _featureLayer = value; }
        }


        IFeatureSelection ITnGeoObject.FeatureSelection
        {
            get { return _featureSelection; }
            set { _featureSelection = value; }
        }


        IQueryFilter ITnGeoObject.QueryFilter
        {
            get { return _queryFilter; }
            set { _queryFilter = value; }
        }


        IFeature ITnGeoObject.Feature
        {
            get { return _feature; }
            set { _feature = value; }
        }


        IFeatureCursor ITnGeoObject.FeatureCursor
        {
            get { return _featureCursor; }
            set { _featureCursor = value; }
        }


        ICursor ITnGeoObject.Cursor
        {
            get { return _cursor; }
            set { _cursor = value; }
        }


        IRow ITnGeoObject.Row
        {
            get { return _row; }
            set { _row = value; }
        }


        IWorkspaceEdit ITnGeoObject.WorkspaceEdit
        {
            get { return _workspaceEdit; }
            set { _workspaceEdit = value; }
        }


        IWorkspace ITnGeoObject.Workspace
        {
            get { return _workspace; }
            set { _workspace = value; }
        }


       string ITnGeoObject.Name
        {
            get { return _name; }
            set { _name = value; }
        }

        string ITnGeoObject.Environment
        {
            get { return _environment; }
            set { _environment = value; }
        }
        IArea ITnGeoObject.Area
        {
            get { return _area; }
            set { _area = value; }
        }

        void ITnMemCalculator.ClearAll()
        {
            _maduong="";
            _tenduong = "";
            _giadatDuong=0;
            _giadatTong=0;
            _giadat1=0;
            _giadat2=0;
            _ghichuThua="";
            _somattien=0;
            _socachtinh=0;
            _cachtinh="";
            _numSelectedFeature=0;
            _newWhereClause="";
            _curWhereClause = "";
            _dientich1 = 0;
            _dientich2 = 0;
            _dientichTong = 0;
            _dongia = 0;
            _inputDuong=null;
            _inputThua=null;
            _inputValues = null;
        }



        #endregion

        #region ITnMemHem Members

        int ITnMemHem.soDuongChinh
        {
            get
            {
                return _soDuongChinh;
            }
            set
            {
                _soDuongChinh=value;
            }
        }

        int ITnMemHem.soHemChinh
        {
            get
            {
                return _soHemChinh;
            }
            set
            {
                _soHemChinh = value;
            }
        }

        string ITnMemHem.tenDuongChinh
        {
            get
            {
                return _tenDuongChinh;
            }
            set
            {
                _tenDuongChinh = value; ;
            }
        }

        string ITnMemHem.tenHemChinh
        {
            get
            {
                return _tenHemChinh;
            }
            set
            {
                _tenHemChinh = value; ;
            }
        }


        string ITnMemHem.ghichuHem
        {
            get
            {
                return _tenDuongChinh;
            }
            set
            {
                _tenDuongChinh = value; ;
            }
        }

        #endregion
    }
}
